home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / linux-sound-base.postinst < prev    next >
Text File  |  2008-09-15  |  2KB  |  64 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. . /usr/share/debconf/confmodule
  6. db_version 2.0
  7.  
  8. case "$1" in
  9. configure|reconfigure)
  10.     if dpkg --compare-versions "$2" lt "1.0.10-4ubuntu2"; then
  11.         # Rename existing symlinks
  12.         if [ -L /etc/modprobe.d/linux-sound-base_noOSS ]; then
  13.             mv /etc/modprobe.d/linux-sound-base_noOSS \
  14.                 /etc/modprobe.d/blacklist-oss
  15.         fi
  16.         if [ -L /etc/modprobe.d/linux-sound-base_noALSA ]; then
  17.             mv /etc/modprobe.d/linux-sound-base_noALSA \
  18.                 /etc/modprobe.d/blacklist-alsa
  19.         fi
  20.  
  21.         # Remove other symlinks and conffiles
  22.         rm -f /etc/hotplug/blacklist.d/linux-sound-base_noOSS
  23.         rm -f /etc/hotplug/blacklist.d/linux-sound-base_noALSA
  24.         rmdir /etc/hotplug/blacklist.d 2>/dev/null || true
  25.         rmdir /etc/hotplug 2>/dev/null || true
  26.  
  27.         rm -f /etc/discover.d/linux-sound-base_noOSS
  28.         rm -f /etc/discover.d/linux-sound-base_noALSA
  29.         rmdir /etc/discover.d 2>/dev/null || true
  30.  
  31.         rm -f /etc/modutils/linux-sound-base_noOSS
  32.         rm -f /etc/modutils/linux-sound-base_noALSA
  33.         rmdir /etc/modutils 2>/dev/null || true
  34.     fi
  35.     db_get linux-sound-base/sound_system || :
  36.     case "$RET" in
  37.     OSS)
  38.         rm -f /etc/modprobe.d/blacklist-oss
  39.         rm -f /etc/modprobe.d/linux-sound-base_noOSS
  40.         ln -sf /lib/linux-sound-base/noALSA.modprobe.conf \
  41.             /etc/modprobe.d/blacklist-alsa
  42.         ;;
  43.     ALSA)
  44.         rm -f /etc/modprobe.d/blacklist-alsa
  45.         rm -f /etc/modprobe.d/linux-sound-base_noALSA
  46.         ln -sf /lib/linux-sound-base/noOSS.modprobe.conf \
  47.             /etc/modprobe.d/blacklist-oss
  48.         ;;
  49.     esac
  50.     ;;
  51. abort-upgrade|abort-remove|abort-deconfigure)
  52.     # We don't have to do anything because we didn't do anything in prerm
  53.     exit 0
  54.     ;;
  55. *)
  56.     echo "postinst called with unknown argument \`$1'" >&2
  57.     exit 1
  58.     ;;
  59. esac
  60.  
  61.  
  62.  
  63. db_stop || :
  64.